package de.tum.in.eist.poll.shared.beans;

import java.io.Serializable;

import de.tum.in.eist.poll.client.views.widgets.questions.QuestionTextWidget;
import de.tum.in.eist.poll.client.views.widgets.questions.QuestionWidget;

/**
 * Question implementation which asks for a Text.
 * 
 * @author The EIST-POLL-21 team.
 *
 */
public final class TextQuestion extends Question implements Serializable {
	
	/**
	 * serialization version
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Dummy constructor for GWT
	 */
	public TextQuestion() {
		super();
	}
	
	/**
	 * Construct a new TextQuestion
	 * 
	 * @param description see {@link Question}, the question text to show to the user.
	 * @param optional    see {@link Question}
	 */
	public TextQuestion(String description, boolean optional) {
		super(description, optional);
	}

	/* (non-Javadoc)
	 * @see de.tum.in.eist.poll.shared.beans.Question#getWidget()
	 */
	@Override
	public QuestionWidget getWidget() {
		return new QuestionTextWidget(this);
	}
}